import math
while True:
    n = int(input("输入一个数字计算他的阶乘:"))
    ns = 1
    for i in range(1,n+1):
        ns = ns*i
    print(ns,"\n")
